<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			body{
				height:1800px;
			}
			#backToTop{
				position:fixed;
				padding:5px;
				right:50px;
				bottom:50px;
				display:none;
				width:40px;
				height:40px;
				color:white;
				background-color:#45b823;
				font-family:微软雅黑;
				font-size:15px;
				font-weight:bold;
				text-align:center;
				letter-spacing:3px;
				cursor:pointer;
			}
		</style>
		<script type="text/javascript" src="../../jQuery/jquery-3.4.1.js"></script>
		<script type="text/javascript">
			$(function(){
				$(window).scroll(function(){
					if($(this).scrollTop()>300){
						$("#backToTop").fadeIn(1000);
					}else{
						$("#backToTop").fadeOut(1000);
					}
				});
				$("#backToTop").click(function(){
					$("html,body").animate({scrollTop:0},500);
				})
			})
		</script>
	</head>
	<body>
		<div id="backToTop">回到顶部</div>
	</body>
</html>
